package com.main.common;

import java.util.List;

public class PageResponse<T> {
    private List<T> data; // 查询得到的数据列表
    private long total;   // 满足条件的总记录数

    public PageResponse() {
    }

    public PageResponse(List<T> data, long total) {
        this.data = data;
        this.total = total;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    @Override
    public String toString() {
        return "PageResponse{" +
                "data=" + data +
                ", total=" + total +
                '}';
    }
}
